package hr.ctg.domain.action.zupanija;

import hr.ctg.domain.model.Zupanija;
import hr.ctg.service.dao.ZupanijaDAO;

import java.util.List;

import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;

@Name("zupanijaSearchAction")
public class ZupanijaSearchAction {
	@In
	ZupanijaDAO zupanijaDAO;

	@Factory("zupanije")
	public List<Zupanija> getAll() {
		return zupanijaDAO.findAll();
	}

	public Zupanija getZupanija(final Integer idZupanije) {
		return zupanijaDAO.find(idZupanije);
	}
}
